connection on whether there are pending replies/watches.
Signed-off-by: Keir Fraser <keir@xensource.com>
list_for_each_entry(i, &connections, list) {
if (i->domain)
continue;
- if (list_empty(&i->out_list))
- FD_SET(i->fd, inset);
+ FD_SET(i->fd, inset);
if (!list_empty(&i->out_list))
FD_SET(i->fd, outset);
if (i->fd > max)
bool domain_can_read(struct connection *conn)
{
- return (list_empty(&conn->out_list) &&
- buffer_has_input(conn->domain->input));
+ return buffer_has_input(conn->domain->input);
}
bool domain_can_write(struct connection *conn)
return;
}
- /* Set to NULL so fire_watches sends events, tdb_context works. */
trans = conn->transaction;
conn->transaction = NULL;
+
/* Attach transaction to arg for auto-cleanup */
talloc_steal(arg, trans);